<include file="public:header" />
<link rel="stylesheet" type="text/css" href="__STATIC__/js/jquery-ui/themes/blue/jquery.ui.all.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__/js/jquery-ui/extend/datepicker/jquery-ui-timepicker-addon.css" />

<div id="bd">
    <div class="layout grid-s45m0 w1000 user-center">
        <div class="col-main">
            <div class="main-wrap">
                <div class="box J_TBox">
                    <div class="global-title">订单明细</div>
                </div>
                <div class="box J_TBox">
                    <div class="global-title" style="border:none;">
                        <div class="order_search_box">
                            <form method="get" action="">
                                <input type="submit" class="order_sub" value="搜索">
                                <input type="button" onclick="resets()" class="order_sub" value="重置">
                                <input type="submit" class="order_sub" value="导出" name="export" id="export-btn"/>

                                <input type="text" id="username" style="width:80px" name="tele" class="order_text fl" placeholder="用户账号" value="{$Think.get.tele}">
                                <input type="text" id="realname" style="width:80px" name="username" class="order_text fl" placeholder="用户昵称" value="{$Think.get.username}">
                                <span class="fl" style="font-size:12px;">开始日期：</span>
                                <input type="text" id="stime" name="stime" class="J_date_picker order_text fl short" value="{$Think.get.stime}" style="width:100px">
                                <span class="fl" style="font-size:12px;">~结束日期：</span>
                                <input type="text" id="etime"  name="etime" class="J_date_picker order_text fl short" value="{$Think.get.etime}" style="width:100px">

                                <span class="standard_select fl">
                                    <!--{:var_dump($arrGroupName);}-->
									<span class="select_shelter">
									<select id="topkey" name="lottery" class="order_select fl" style="width:112px;">
										<option value="" selected>升级状态</option>
                                        <?php
                                        foreach($listLotteryStatus as $k=>$v)
                                        {
                                            if($k == $_GET['lottery'])
                                            {
                                    ?>
                                        <option value="{$k}" selected>{$v}</option>
                                        <?php
                                            }else{
                                    ?>
                                        <option value="{$k}">{$v}</option>
                                        <?php
                                            }
                                        }
                                    ?>
									</select>
									</span>
								</span>
                                <span class="standard_select fl">
									<span class="select_shelter">
									<select id="lottery" name="status" class="order_select fl" style="width:112px;">
										<option value="">订单状态</option>
                                        <?php
                                        foreach($listOrderStatus as $k=>$v)
                                        {
                                            if($k == $_GET['status'])
                                            {
                                    ?>
                                        <option value="{$k}" selected>{$v}</option>
                                        <?php
                                            }else{
                                    ?>
                                        <option value="{$k}">{$v}</option>
                                        <?php
                                            }
                                        }
                                    ?>
									</select>
									</span>
								</span>

                                <span class="standard_select fl">
									<span class="select_shelter">
									<select id="" name="uid" onchange="getNestUids(this)" class="order_select fl" style="width:112px;">
										<option value="{$uid}">--{$new_username}--</option>
                                        <foreach name="listTeams" item="vo" key="ko">
                                            <option value="{$vo.id}">{$vo.username}</option>
                                        </foreach>
									</select>
									</span>
								</span>
                                <input type="hidden" name="g" value="team">
                                <input type="hidden" name="m" value="user">
                                <input type="hidden" name="a" value="order_info">
                            </form>
                        </div>
                    </div>
                </div>
                <div class="box J_TBox">
                    <div class="global-title" style="border-bottom:none;padding:0;">
                        <div>
                            <div style="font-size:14px;float:left;">
                                总交易额：￥{$order.total}元&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                今日交易额：￥{$order.days}元&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                返佣：￥{$commission}元&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                运费：￥{-$express}元
                                <br>
                                成功退款额：￥{$order.success_refund}元&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                成功提货额：￥{$order.success_delivery}元&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                成功待处理额：￥{$order.success_wait}元&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                <br>
                                失败提货额：￥{$order.failed}元&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                升级中金额：￥{$order.uporder}元

                            </div>
                        </div>
                    </div>
                </div>
                <div class="box J_TBox">
                    <div class="diary-content">
                        <table class="table_list" width="100%" cellspacing="0" cellpadding="0">
                            <tr class="title">
                                <th width="100">用户账号</th>
                                <th width="80">真实姓名</th>
                                <th width="80">所属经纪人</th>
                                <th width="120">所属全民经纪人</th>
                                <th width="80">订单金额</th>
                                <th width="65">升级状态</th>
                                <th width="80">订单状态</th>
                                <th width="80">代理商名称</th>
                                <th width="85">经销商名称</th>
                                <th width="95">总经销商名称</th>
                                <th width="80">团队名称</th>
                            </tr>
                            <tr class="content_tr underline">
                                <td colspan="14">
                                    <div class="weixiao">
                                        {$tuanNmae}是--{$new_username}--的订单详情是
                                    </div>
                                </td>
                            </tr>
                            <if condition="$lists">
                                <volist name="lists" id="val">
                                    <tr class="content_tr underline">
                                        <td align="left">
                                            {$val.tele}
                                        </td>
                                        <td align="center">
                                            {$val.username}
                                        </td>
                                        <td align="center">
                                            {$val.tgroup_4}
                                        </td>
                                        <td align="center">
                                            {$val.tgroup_5}
                                        </td>
                                        <td align="center">
                                            {$val.prices}
                                        </td>
                                        <td align="center">
                                            {$val.lottery}
                                        </td>
                                        <td align="center">
                                            {$val.status}
                                        </td>
                                        <td align="center">
                                            {$val.tgroup_3}
                                        </td>
                                        <td align="center">
                                            {$val.tgroup_2}
                                        </td>
                                        <td align="center">
                                            {$val.tgroup_1}
                                        </td>
                                        <td align="center">
                                            {$val.topkey}
                                        </td>
                                    </tr>
                                </volist>
                                <else />
                                <tr class="content_tr underline">
                                    <td colspan="14"><div class="weixiao">暂无内容 </div></td>
                                </tr>
                            </if>
                        </table>
                    </div>
                </div>
                <div class="box J_TBox">
                    <div class="global-pages">
						<span class="num">
							{$page}
						</span>
                    </div>
                </div>
            </div>
        </div>
        <include file="user:left" />
    </div>
</div>
<script>
//    清空
    function resets(f1)
    {
        $('#username').val('');
        $('#realname').val('');
        $('#stime').val('');
        $('#etime').val('');
        $('#topkey').find('option:first-child').attr('selected',"selected");
        $('#lottery').find('option:first-child').attr('selected',"selected");
    }

//    级联
    function getNestUids(obj){
        var ob = $(obj);
        var uid = ob.val();
        var par = ob.parents('.standard_select');
        par.nextAll('.standard_select').remove();
        $.ajax({
            type:'get',
            url:"{:U('user/getNestUids')}",
            data:{uid:uid},
            success:function(data)
            {
                par.after(data);
            },
            error:function()
            {
//                console.log(data);
                alert('异常');
            },
            dataType:'json',
        });
    }
</script>
<!--主部结束-->
<include file="public:footer" />